package org.jiajie.coffeecodes.concurrent.pattern.interrupt;

import java.util.concurrent.TimeUnit;

/**
 * @author jay
 */
public class TwoPhaseTerminationTest {
    public static void main(String[] args) {
        TwoPhaseTermination pattern = new TwoPhaseTermination();
        pattern.start();

        try {
            TimeUnit.SECONDS.sleep(2);
            pattern.stop();
            TimeUnit.SECONDS.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
